package exception

import (
	"gitee.com/xxhsjp/x-core/app"
	"gitee.com/xxhsjp/x-core/enums"
)

var NotExistException = NewTraceError(&NotExist{
	code: enums.NotExist.Code,
	msg:  enums.NotExist.Text,
})

type NotExist struct {
	code string
	msg  string
}

func (e *NotExist) Code() string {
	return app.App.Code + e.code
}

func (e *NotExist) Error() string {
	return e.msg
}
